import request from '@/utils/request';

export async function fetch(params) {
  return request(`/eofficeserver/api/resource?rid=${params.rid}`);
}

export async function view(params) {
  return request(`/eofficeserver/api/resource/view?rid=${params.rid}`);
}

export async function del(params) {
  return request(`/eofficeserver/api/resource`, {
    method: 'DELETE',
    data: params,
  });
}

export async function add(params) {
  return request(`/eofficeserver/api/resource`, {
    method: 'POST',
    data: params,
  });
}

export async function undel(params) {
  return request(`/eofficeserver/api/resource/undel`, {
    method: 'POST',
    data: params,
  });
}
